import requests
import base64
if __name__ == "__main__":
    url = 'https://ss.qysrdjg.com/tp/siyuefulitu/zipai/330/01.jpg.txt'
    # content(二进制类型)，text(字符串类型)，json(对象类型)
    img_data= requests.get(url=url).content

    src = ""
    data = src.split(',')[1]
    image_data = base64.b64decode(data)
    str='UYyhhpbppo='
    image_data2 = base64.b64decode(str)

    with open('1.jpg', 'wb') as f:
        f.write(image_data)
    with open('2.jpg','wb') as fp:    # wb 二进制写入
        fp.write(image_data2)
